package com.ldl.service.impl;

import java.sql.SQLException;
import java.util.List;

import com.ldl.dao.UserDao;
import com.ldl.dao.impl.UserDaoImpl;
import com.ldl.entity.User;
import com.ldl.service.UserService;

/**
 * @author Administrator
 * Author : L.D.L
 * E-mail : 1419485293@qq.com
 * Date : 2020年8月4日下午7:55:50
 */
public class UserServiceImpl implements UserService{

	private UserDao userDao = new UserDaoImpl();

	@Override
	public User login(String userName,String userPwd) throws SQLException {
		List<User> list = userDao.login(userName);
		User u = null;
		for (User user : list) {
			if(user.getUserPwd().equals(userPwd));
			u = user;
		}
		return u;
	}
	

}
